﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.Prism.Modularity;
using Microsoft.Practices.Unity;
using Microsoft.Practices.Prism.Regions;
using BBInterfaceNET.Designer.Views;
using BBInterfaceNET.Designer.Services;

namespace BBInterfaceNET.Designer.ModuleDefinition
{
    public class DesignerModule:IModule
    {
        IUnityContainer container;

        public DesignerModule(IUnityContainer container)
        {
            this.container = container;
        }

        public void Initialize()
        {
            container.RegisterInstance<IAddFieldService>(new AddFieldService());
            IRegionManager regionManager=container.Resolve<IRegionManager>();
            regionManager.RegisterViewWithRegion("DesignerRegion", typeof(DesignerView));
        }
    }
}
